let mqtt = require('mqtt')

let client = mqtt.connect('mqtt://localhost', {
    port: 1883,
    clientId: 'cli_sub1',
    username: 'visitor123333',
    clean: false//增加了此项
})

client.subscribe('system/#', { qos: 1 });

client.on('message', function (topic, message) {
    console.log('received message: ', message.toString())
})